home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / bsd / rpcsvc / nlm_prot.h < prev    next >
C/C++ Source or Header  |  1990-01-29  |  3KB  |  203 lines

  1. /*    @(#)nlm_prot.h    1.2 88/07/11 4.0NFSSRC SMI    */
  2.  
  3. /* 
  4.  * Copyright (c) 1988 by Sun Microsystems, Inc.
  5.  * @(#) from SUN 1.4
  6.  */
  7. #ifndef __NLM_PROT_HEADER__
  8. #define __NLM_PROT_HEADER__
  9.  
  10. #define NLM_PROG 100021
  11. #define NLM_VERS 1
  12. #define NLM_TEST 1
  13. #define NLM_LOCK 2
  14. #define NLM_CANCEL 3
  15. #define NLM_UNLOCK 4
  16. #define NLM_GRANTED 5
  17. #define NLM_TEST_MSG 6
  18. #define NLM_LOCK_MSG 7
  19. #define NLM_CANCEL_MSG 8
  20. #define NLM_UNLOCK_MSG 9
  21. #define NLM_GRANTED_MSG 10
  22. #define NLM_TEST_RES 11
  23. #define NLM_LOCK_RES 12
  24. #define NLM_CANCEL_RES 13
  25. #define NLM_UNLOCK_RES 14
  26. #define NLM_GRANTED_RES 15
  27. #define NLM_VERSX 3
  28. #define NLM_SHARE 20
  29. #define NLM_UNSHARE 21
  30. #define NLM_NM_LOCK 22
  31. #define NLM_FREE_ALL 23
  32.  
  33. #define LM_MAXSTRLEN    1024
  34. #define MAXNAMELEN    LM_MAXSTRLEN+1
  35.  
  36. enum nlm_stats {
  37.     nlm_granted = 0,
  38.     nlm_denied = 1,
  39.     nlm_denied_nolocks = 2,
  40.     nlm_blocked = 3,
  41.     nlm_denied_grace_period = 4,
  42. };
  43. typedef enum nlm_stats nlm_stats;
  44. bool_t xdr_nlm_stats();
  45.  
  46.  
  47. struct nlm_holder {
  48.     bool_t exclusive;
  49.     int svid;
  50.     netobj oh;
  51.     u_int l_offset;
  52.     u_int l_len;
  53. };
  54. typedef struct nlm_holder nlm_holder;
  55. bool_t xdr_nlm_holder();
  56.  
  57.  
  58. struct nlm_testrply {
  59.     nlm_stats stat;
  60.     union {
  61.         struct nlm_holder holder;
  62.     } nlm_testrply_u;
  63. };
  64. typedef struct nlm_testrply nlm_testrply;
  65. bool_t xdr_nlm_testrply();
  66.  
  67.  
  68. struct nlm_stat {
  69.     nlm_stats stat;
  70. };
  71. typedef struct nlm_stat nlm_stat;
  72. bool_t xdr_nlm_stat();
  73.  
  74.  
  75. struct nlm_res {
  76.     netobj cookie;
  77.     nlm_stat stat;
  78. };
  79. typedef struct nlm_res nlm_res;
  80. bool_t xdr_nlm_res();
  81.  
  82.  
  83. struct nlm_testres {
  84.     netobj cookie;
  85.     nlm_testrply stat;
  86. };
  87. typedef struct nlm_testres nlm_testres;
  88. bool_t xdr_nlm_testres();
  89.  
  90.  
  91. struct nlm_lock {
  92.     char *caller_name;
  93.     netobj fh;
  94.     netobj oh;
  95.     int svid;
  96.     u_int l_offset;
  97.     u_int l_len;
  98. };
  99. typedef struct nlm_lock nlm_lock;
  100. bool_t xdr_nlm_lock();
  101.  
  102.  
  103. struct nlm_lockargs {
  104.     netobj cookie;
  105.     bool_t block;
  106.     bool_t exclusive;
  107.     struct nlm_lock alock;
  108.     bool_t reclaim;
  109.     int state;
  110. };
  111. typedef struct nlm_lockargs nlm_lockargs;
  112. bool_t xdr_nlm_lockargs();
  113.  
  114.  
  115. struct nlm_cancargs {
  116.     netobj cookie;
  117.     bool_t block;
  118.     bool_t exclusive;
  119.     struct nlm_lock alock;
  120. };
  121. typedef struct nlm_cancargs nlm_cancargs;
  122. bool_t xdr_nlm_cancargs();
  123.  
  124.  
  125. struct nlm_testargs {
  126.     netobj cookie;
  127.     bool_t exclusive;
  128.     struct nlm_lock alock;
  129. };
  130. typedef struct nlm_testargs nlm_testargs;
  131. bool_t xdr_nlm_testargs();
  132.  
  133.  
  134. struct nlm_unlockargs {
  135.     netobj cookie;
  136.     struct nlm_lock alock;
  137. };
  138. typedef struct nlm_unlockargs nlm_unlockargs;
  139. bool_t xdr_nlm_unlockargs();
  140.  
  141. /*
  142.  * The following enums are actually bit encoded for efficient
  143.  * boolean algebra.... DON'T change them.....
  144.  */
  145.  
  146. enum fsh_mode {
  147.     fsm_DN = 0,
  148.     fsm_DR = 1,
  149.     fsm_DW = 2,
  150.     fsm_DRW = 3,
  151. };
  152. typedef enum fsh_mode fsh_mode;
  153. bool_t xdr_fsh_mode();
  154.  
  155.  
  156. enum fsh_access {
  157.     fsa_NONE = 0,
  158.     fsa_R = 1,
  159.     fsa_W = 2,
  160.     fsa_RW = 3,
  161. };
  162. typedef enum fsh_access fsh_access;
  163. bool_t xdr_fsh_access();
  164.  
  165.  
  166. struct nlm_share {
  167.     char *caller_name;
  168.     netobj fh;
  169.     netobj oh;
  170.     fsh_mode mode;
  171.     fsh_access access;
  172. };
  173. typedef struct nlm_share nlm_share;
  174. bool_t xdr_nlm_share();
  175.  
  176.  
  177. struct nlm_shareargs {
  178.     netobj cookie;
  179.     nlm_share share;
  180.     bool_t reclaim;
  181. };
  182. typedef struct nlm_shareargs nlm_shareargs;
  183. bool_t xdr_nlm_shareargs();
  184.  
  185.  
  186. struct nlm_shareres {
  187.     netobj cookie;
  188.     nlm_stats stat;
  189.     int sequence;
  190. };
  191. typedef struct nlm_shareres nlm_shareres;
  192. bool_t xdr_nlm_shareres();
  193.  
  194.  
  195. struct nlm_notify {
  196.     char *name;
  197.     long state;
  198. };
  199. typedef struct nlm_notify nlm_notify;
  200. bool_t xdr_nlm_notify();
  201.  
  202. #endif __NLM_PROT_HEADER__
  203.